package sg.edu.nus.iss.phoenix.schedule.dao;

import java.sql.SQLException;
import java.util.List;

import sg.edu.nus.iss.phoenix.schedule.entity.AnnualSchedule;

/**
 * @author Wang Shunde
 *
 */
public interface AnnualScheduleDAO {
	
	/**
	 * This method returns an {@link AnnualSchedule}.
	 * @param schedule_year
	 *            This parameter contains the year to return.
	 * @return
	 *            The {@link AnnualSchedule} found.
	 * @throws SQLException
	 */
	AnnualSchedule searchMatching(int schedule_year) throws SQLException;

	/**
	 * This method returns all {@link AnnualSchedule} in database.
	 * @return
	 *            A list of {@link AnnualSchedule}.
	 * @throws SQLException
	 */
	List<AnnualSchedule> searchMatching() throws SQLException;
	
	/**
	 * This method will create a new {@link AnnualSchedule} with the year specified.
	 * @param year
	 * 			Year of {@link AnnualSchedule}
	 * @param userId
	 * 			id of the currently logged in {@link User}
	 * @throws SQLException
	 */
	void createAnnualSchedule(int year, long userId) throws SQLException;
	
	/**
	 * This method will delete the {@link AnnualSchedule} with the year specified.
	 * @param year
	 * 			Year of {@link AnnualSchedule}
	 * @throws SQLException
	 */
	void deleteAnnualSchedule(int year) throws SQLException;
}
